﻿package ygg.encoding.amf.type.v3
{
	import ygg.encoding.amf.type.*;
	import ygg.encoding.amf.*;
	
	import j.sus2maj7.encoding.*;
	
	public class TrueCodec extends Amf3Codec
	{
		public function TrueCodec()
		{
			
		}
		
		override public function decode(binary:IBinary, context:IContext=null):*
		{
			return true;
		}
		
		override public function encode(o:*, context:IContext=null):IBinary
		{
			var b:AmfBinary = new AmfBinary();
			
			b.writeByte(Amf3Marker.TRUE);
			
			return b;
		}
	}
}